<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>网络科学中国</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<?php
//session_start();
include_once("config.inc.php");
include_once("function.php");
?>
<script language="javascript">
function chkinput(form){
  if(form.user.value==""){
	alert("请输入用户名！");
	form.user.focus();
	return(false);
  }

  if(form.email.value==""){
	alert("请输入E-mail！");
	form.email.focus();
	return(false);
  }

	 var i=form.email.value.indexOf("@");
	 var j=form.email.value.indexOf(".");
	 if((i<0)||(i-j>0)||(j<0)){
	   alert("请输入正确的E-mail地址!");
	   form.email.focus();
	   return(false);
	 }
  
  if(form.content.value==""){
	alert("请输入留言内容！");
	form.content.focus();
	return(false);
  }
 
  return(true);
 }

</script>
<table width="810" height="23" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="292" background="images/dh_back.gif"><div align="center"><font color=#FFFFFF style='font-size:9pt;font-family: 宋体'>今天是：</font>&nbsp;<script language=JavaScript>
   today=new Date();
   function initArray(){
   this.length=initArray.arguments.length
   for(var i=0;i<this.length;i++)
   this[i+1]=initArray.arguments[i]  }
   var d=new initArray(
     "星期日",
     "星期一",
     "星期二",
     "星期三",
     "星期四",
     "星期五",
     "星期六");
document.write(
     "<font color=#FFFFFF style='font-size:9pt;font-family: 宋体'> ",
     today.getFullYear(),"年",
     today.getMonth()+1,"月",
     today.getDate(),"日",
	  "&nbsp;&nbsp;",
     d[today.getDay()+1],
	"</font>" ); 
</script></div></td>
<td>
	<div align="center"><a href="message.php">去留言板</a></div>
</td>
<td>
	<div align="center"><a href="index.php">网站首页</a></div>
</td>
</tr>
</table>
<table width="810" height="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td  valign="top">
      <table width="810" height="550" border="0" cellpadding="0" cellspacing="1">
        <tr>
		  <td bgcolor="#FFFFFF" valign="top">
			<table width="810" height="24" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center">&nbsp;&nbsp;&nbsp;发表留言</td>
            </tr>
          </table>
            <table width="500" height="550" border="0" align="center" cellpadding="0" cellspacing="0">
             <form name="form1" method="post" action="savemessage.php">
			  <tr>
                <td height="30" colspan="2">&nbsp;</td>
              </tr>
              <tr>
				<td width="120" height="30"><div align="center">用户名：</td>
				<td width="380" >&nbsp;<input type="text" name="user" size="40" class="inputcss"></td>
              </tr>
              <tr>
              <tr>
				<td width="120" height="30"><div align="center">email：</div></td>
				<td width="380">&nbsp;<input type="text" name="email" size="40" class="inputcss"></td>
              </tr>
              <tr>
                <td width="150" height="30"><div align="center">内容：</div></td>
                <td width="350">&nbsp;<textarea name="content" rows="16" cols="55" class="inputcss"></textarea></td>
              </tr>
              <tr>
                <td colspan="2"><div align="center"><input type="submit"  name="submit" value="发表" onclick="return chkinput(form1);">&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value="重写" ></div></td>
              </tr>
			  </form>
            </table></td>
        </tr>
      </table>
	  </td>
  </tr>
</table>
<?php
	include("footer.php");
?>
</body>
</html>
